#include "GeometryLib.h"

namespace egg{

    GeometryLib gGeometryLib;

    void GeometryLib::addGeometry(const string& name,GeometryPtr geo){
        mGeometrys.insert(make_pair(name,geo));
    }

    GeometryPtr GeometryLib::getGeometry(const string& name){
        unordered_map<string,GeometryPtr>::iterator itr=mGeometrys.find(name);
        if(itr!=mGeometrys.end()){
            return itr->second;
        }else{
            LogMgr->logMessage(name+" geometry not exist");
            return GeometryPtr(0);
        }
    }

}